package ro.isdc.training.jpa.professor.domain;

import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import ro.isdc.training.jpa.course.domain.Course;
import ro.isdc.training.jpa.misc.domain.Person;

/**
 * Professor class.
 * 
 * @author Andrei Chirila
 */
public class Professor extends Person {

	/**
	 * Generated Serial Version UID
	 */
	private static final long serialVersionUID = -1046961237773106925L;

	/**
	 * System user
	 */
	private long systemUserId = -1;

	/**
	 * Years of experience
	 */
	private int yearsOfExperience;

	/**
	 * The courses to which the professor is owner.
	 */
	private List<Course> courses;

	/**
	 * @return the systemUserId
	 */
	public long getSystemUserId() {
		return systemUserId;
	}

	/**
	 * @param systemUserId
	 *          the systemUserId to set
	 */
	public void setSystemUserId(final long systemUserId) {
		this.systemUserId = systemUserId;
	}

	/**
	 * @return the yearsOfExperience
	 */
	public int getYearsOfExperience() {
		return yearsOfExperience;
	}

	/**
	 * @param yearsOfExperience
	 *          the yearsOfExperience to set
	 */
	public void setYearsOfExperience(final int yearsOfExperience) {
		this.yearsOfExperience = yearsOfExperience;
	}

	/**
	 * @return the courses
	 */
	public List<Course> getCourses() {
		return courses;
	}

	/**
	 * @param courses
	 *          the courses to set
	 */
	public void setCourses(final List<Course> courses) {
		this.courses = courses;
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append(
				"dateOfBirth", this.dateOfBirth).append("lastName", this.lastName)
				.append("versionNo", this.versionNo).append("entityId", this.entityId)
				.append("SSN", this.SSN).append("systemUserId", this.systemUserId)
				.append("sexType", this.sexType).append("firstName", this.firstName)
				.append("yearsOfExperience", this.yearsOfExperience).append(
						"creationTimestamp", this.creationTimestamp).append(
						"lastUpdateTimestamp", this.lastUpdateTimestamp).toString();
	}

}
